//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Length;

@ApiModel(
        value = "RoleSaveDTO",
        description = "角色"
)
public class RoleSaveDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("角色名称")
    @NotEmpty(
            message = "角色名称不能为空"
    )
    @Length(
            max = 30,
            message = "角色名称长度不能超过30"
    )
    private String name;
    @ApiModelProperty("角色编码")
    @Length(
            max = 20,
            message = "角色编码长度不能超过20"
    )
    private String code;
    @ApiModelProperty("功能描述")
    @Length(
            max = 100,
            message = "功能描述长度不能超过100"
    )
    private String describe;
    @ApiModelProperty("状态")
    private Boolean status;
    @ApiModelProperty("关联的组织id")
    private List<Long> orgList;

    public static RoleSaveDTOBuilder builder() {
        return new RoleSaveDTOBuilder();
    }

    public String getName() {
        return this.name;
    }

    public String getCode() {
        return this.code;
    }

    public String getDescribe() {
        return this.describe;
    }

    public Boolean getStatus() {
        return this.status;
    }

    public List<Long> getOrgList() {
        return this.orgList;
    }

    public RoleSaveDTO setName(final String name) {
        this.name = name;
        return this;
    }

    public RoleSaveDTO setCode(final String code) {
        this.code = code;
        return this;
    }

    public RoleSaveDTO setDescribe(final String describe) {
        this.describe = describe;
        return this;
    }

    public RoleSaveDTO setStatus(final Boolean status) {
        this.status = status;
        return this;
    }

    public RoleSaveDTO setOrgList(final List<Long> orgList) {
        this.orgList = orgList;
        return this;
    }

    public RoleSaveDTO() {
    }

    public RoleSaveDTO(final String name, final String code, final String describe, final Boolean status, final List<Long> orgList) {
        this.name = name;
        this.code = code;
        this.describe = describe;
        this.status = status;
        this.orgList = orgList;
    }

    public String toString() {
        return "RoleSaveDTO(super=" + super.toString() + ", name=" + this.getName() + ", code=" + this.getCode() + ", describe=" + this.getDescribe() + ", status=" + this.getStatus() + ", orgList=" + this.getOrgList() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof RoleSaveDTO)) {
            return false;
        } else {
            RoleSaveDTO other = (RoleSaveDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label71: {
                    Object this$name = this.getName();
                    Object other$name = other.getName();
                    if (this$name == null) {
                        if (other$name == null) {
                            break label71;
                        }
                    } else if (this$name.equals(other$name)) {
                        break label71;
                    }

                    return false;
                }

                Object this$code = this.getCode();
                Object other$code = other.getCode();
                if (this$code == null) {
                    if (other$code != null) {
                        return false;
                    }
                } else if (!this$code.equals(other$code)) {
                    return false;
                }

                label57: {
                    Object this$describe = this.getDescribe();
                    Object other$describe = other.getDescribe();
                    if (this$describe == null) {
                        if (other$describe == null) {
                            break label57;
                        }
                    } else if (this$describe.equals(other$describe)) {
                        break label57;
                    }

                    return false;
                }

                Object this$status = this.getStatus();
                Object other$status = other.getStatus();
                if (this$status == null) {
                    if (other$status != null) {
                        return false;
                    }
                } else if (!this$status.equals(other$status)) {
                    return false;
                }

                Object this$orgList = this.getOrgList();
                Object other$orgList = other.getOrgList();
                if (this$orgList == null) {
                    if (other$orgList == null) {
                        return true;
                    }
                } else if (this$orgList.equals(other$orgList)) {
                    return true;
                }

                return false;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof RoleSaveDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $code = this.getCode();
        result = result * 59 + ($code == null ? 43 : $code.hashCode());
        Object $describe = this.getDescribe();
        result = result * 59 + ($describe == null ? 43 : $describe.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $orgList = this.getOrgList();
        result = result * 59 + ($orgList == null ? 43 : $orgList.hashCode());
        return result;
    }

    public static class RoleSaveDTOBuilder {
        private String name;
        private String code;
        private String describe;
        private Boolean status;
        private List<Long> orgList;

        RoleSaveDTOBuilder() {
        }

        public RoleSaveDTOBuilder name(final String name) {
            this.name = name;
            return this;
        }

        public RoleSaveDTOBuilder code(final String code) {
            this.code = code;
            return this;
        }

        public RoleSaveDTOBuilder describe(final String describe) {
            this.describe = describe;
            return this;
        }

        public RoleSaveDTOBuilder status(final Boolean status) {
            this.status = status;
            return this;
        }

        public RoleSaveDTOBuilder orgList(final List<Long> orgList) {
            this.orgList = orgList;
            return this;
        }

        public RoleSaveDTO build() {
            return new RoleSaveDTO(this.name, this.code, this.describe, this.status, this.orgList);
        }

        public String toString() {
            return "RoleSaveDTO.RoleSaveDTOBuilder(name=" + this.name + ", code=" + this.code + ", describe=" + this.describe + ", status=" + this.status + ", orgList=" + this.orgList + ")";
        }
    }
}
